
const initState = [{ books: '西厢记' }]

export default function bookReducer (state = initState, action) {
    console.log(action)

    switch (action.type) {
        case 'add':

            return [action.payload, ...state]


        default:
            break;
    }


    return state
}


